package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/21.
 */
public class ReplyLikeCommentAction extends AHttpService<PbBean.PbResCommentLikeComment>{
    private int commentId;

    private ReplyLikeCommentAction(Context context, int commentId) {
        super(context);
        this.commentId = commentId;
    }

    public static ReplyLikeCommentAction newInstance(Context context, int commentId) {
        return new ReplyLikeCommentAction(context, commentId);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqCommentLikeComment.Builder builder = PbBean.PbReqCommentLikeComment.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setId(commentId);

        return apiService.replyLikeComment(builder.build());
    }
}
